package com.iwhalecloud.bss.kite.cucc.service.attr.handler;

import com.iwhalecloud.bss.kite.common.constant.KeyConsts;
import com.iwhalecloud.bss.kite.common.util.KiteStringUtils;
import com.iwhalecloud.bss.kite.manager.inst.KiteAttr;
import com.iwhalecloud.bss.kite.manager.inst.KiteInst;
import com.iwhalecloud.bss.kite.service.attr.AttrData;
import com.iwhalecloud.bss.kite.service.attr.handler.AbstractAttrHandler;

/**
 * 政务云-部署域-属性处理类
 */
public class DevlopmentDomainAttrHandler extends AbstractAttrHandler<KiteInst, AttrData> {
    @Override
    public void after(KiteAttr attr, KiteInst inst, AttrData data) {
        super.after(attr, inst, data);
        //云主机类型
        KiteAttr cloudHostTypeattr = inst.getAttr("200000111");

        if (KiteStringUtils.equalsAny(cloudHostTypeattr.getValue(), "100000277", "100000276", "100000274", "100006264") || KiteStringUtils.equals("1003538",inst.getSpecId())) {
            attr.setIsNull(KeyConsts.IFTRUE_F);
        } else {
            attr.setIsNull(KeyConsts.IFTRUE_T);
        }
    }
}
